package com.ecloud.gardensterminal.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.ecloud.gardensterminal.controller.dto.GardensThresholdDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Squbi
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GardensThreshold {
    @TableId
    private Integer thresholdId;
    private Integer deviceId;
    private String thresholdField;
    private Double thresholdMax;
    private Double thresholdMin;
    private Integer callDeviceId;
    private Integer callOperation;

    public GardensThreshold(GardensThresholdDto dto) {
        this.deviceId = dto.getDeviceId();
        this.thresholdField = dto.getThresholdFiled();
        this.thresholdMax = dto.getThresholdMax();
        this.thresholdMin = dto.getThresholdMin();
        this.callDeviceId = dto.getCallDeviceId();
        this.callOperation = dto.getCallOperation();
    }
}
